package com.eascs.dubbo.loan.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.eascs.admin.common.service.IRefundLineService;
import com.eascs.admin.common.vo.ModelResult;
import com.eascs.admin.common.vo.RefundLine;
import com.eascs.admin.o2o.loan.service.O2oLoanapplyService;
import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.common.util.StringUtil;

/**
 * 
 * @author yy
 *
 */

@Service
public class RefundLineService implements IRefundLineService{
	public final Logger logger = LoggerFactory.getLogger(RefundLineService.class);
	@Autowired
	private O2oLoanapplyService o2oloanapplyService;
	@Override
	public  ModelResult<List<RefundLine>> queryOldRefundLine(String idcard, String idType,String name,String phoneNumber) {
		// TODO Auto-generated method stub
		 ModelResult<List<RefundLine>> result = new ModelResult<>("0000", "成功");
			if(StringUtil.isEmpty(idcard)){
				result.setErrCode("0001");
				result.setErrMsg("证件号码不能为空");
				return result;
			}
			if(StringUtil.isEmpty(idType)){
				result.setErrCode("0002");
				result.setErrMsg("证件类型不能为空");
				return result;
			}
		List<RefundLine>  l = o2oloanapplyService.queryRefundLine(idcard, idType,name,phoneNumber);
		result.setModel(l);
		return result;
	}
}
